package demo3;

import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86138
 * Date: 2024-10-23
 * Time: 14:56
 */
public class Test {
    public static void main(String[] args) {
        Course s1 = new Course("zhang",new int[]{66,56,78,89},new String[]{"线性代数","离散数学","java","c"});
        Course s2 = new Course("wang",new int[]{88,76,49,93},new String[]{"线性代数","离散数学","java","c"});
        //double ret1 = s1.ave();
        //double ret2 = s2.ave();
        //System.out.println("第一个学生："+ret1+"第二个学生："+ret2);
        //boolean ret3 = s1.is_Ok(InterS.age);



        //按成绩排序输出两位同学的成绩以及课程名称
        s1.bubbleSort(s1.score,s1.className);
        System.out.println("第一名同学成绩及其课程名称（从小到大排序）：");
        System.out.println(Arrays.toString(s1.score));
        System.out.println(Arrays.toString(s1.className));

        System.out.println("第二名同学成绩及其课程名称（从小到大排序）：");
        s2.bubbleSort(s2.score,s2.className);
        System.out.println(Arrays.toString(s2.score));
        System.out.println(Arrays.toString(s2.className));




        System.out.println("检查姓是否为Zhang前：s1名字："+s1.name+"     s2名字："+s2.name);
        if(s1.name.equals("zhang")){
            s1.name = "Zhang";
        }
        if(s2.name.equals("zhang")){
            s1.name = "Zhang";
        }
        System.out.println("检查姓是否为Zhang后：s1名字："+s1.name+"     s2名字："+s2.name);
        System.out.println("第一名同学名字长度："+s1.name.length());
        System.out.println("第二名同学名字长度："+s2.name.length());

    }



}
